package com.zcyh.exam.job.scheduling;

import com.zcyh.exam.mapper.ScheduledMapper;
import com.zcyh.exam.model.entity.SpringScheduledCron;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author timo 2021/4/1
 */
@Component
@Slf4j
public class TestTask implements ScheduledOfTask {
    @Autowired
    private ScheduledMapper scheduledMapper;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void execute(SpringScheduledCron scheduledCron) {
        /*执行定时业务*/
    }

}
